package com.atguigu.controller;

import com.atguigu.properties.DataSourceProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@EnableConfigurationProperties(DataSourceProperties.class)
public class ApplicationController {

    @Autowired
    DataSourceProperties dataSourceProperties;
    
    @RequestMapping("/hello")
    public String hello(){
        System.out.println(dataSourceProperties);
        System.out.println("dataSourceProperties11111111111111111111 = " + dataSourceProperties);
        System.out.println("dataSourceProperties11111111111111111111 = " + dataSourceProperties);
        System.out.println("dataSourceProperties11111111111111111111 = " + dataSourceProperties);
        System.out.println("dataSourceProperties11111111111111111111 = " + dataSourceProperties);
        System.out.println("dataSourceProperties22222222222222222222 = " + dataSourceProperties);
        System.out.println("dataSourceProperties11111111111111111111 = " + dataSourceProperties);
        System.out.println("dataSourceProperties11111111111111111111 = " + dataSourceProperties);
        return "hello,word";
    }

}
